<template>
  <div class="home-container">
    <div class="welcome-card">
      <div class="welcome-header">
        <h2>欢迎使用管理系统</h2>
      </div>
      <div class="statistics">
        <el-row :gutter="20">
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon user-icon"><user /></el-icon>
                <div class="stat-info">
                  <div class="stat-value">1,234</div>
                  <div class="stat-label">用户总数</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon order-icon"><tickets /></el-icon>
                <div class="stat-info">
                  <div class="stat-value">567</div>
                  <div class="stat-label">订单总数</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon money-icon"><money /></el-icon>
                <div class="stat-info">
                  <div class="stat-value">¥89,765</div>
                  <div class="stat-label">总销售额</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon message-icon"><chat-dot-round /></el-icon>
                <div class="stat-info">
                  <div class="stat-value">23</div>
                  <div class="stat-label">未读消息</div>
                </div>
              </div>
            </el-card>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script>
import { User, Tickets, Money, ChatDotRound } from '@element-plus/icons-vue'

export default {
  name: 'HomePage',
  components: {
    User,
    Tickets,
    Money,
    ChatDotRound
  }
}
</script>

<style scoped>
.home-container {
  padding: 20px;
}

.welcome-card {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
}

.welcome-header {
  margin-bottom: 24px;
}

.welcome-header h2 {
  margin: 0;
  font-size: 24px;
  color: #303133;
}

.statistics {
  margin-top: 20px;
}

.stat-card {
  transition: all 0.3s;
  border: none;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-item {
  display: flex;
  align-items: center;
}

.stat-icon {
  font-size: 48px;
  margin-right: 15px;
  padding: 12px;
  border-radius: 8px;
}

.user-icon {
  color: #409EFF;
  background-color: rgba(64,158,255,.1);
}

.order-icon {
  color: #67C23A;
  background-color: rgba(103,194,58,.1);
}

.money-icon {
  color: #E6A23C;
  background-color: rgba(230,162,60,.1);
}

.message-icon {
  color: #F56C6C;
  background-color: rgba(245,108,108,.1);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: bold;
  color: #303133;
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: #909399;
  margin-top: 8px;
}
</style> 